## displayMenu is defined in WEB-INF/classes/globalMacros.vm
#macro( menuItem $menu $level )
  ## set title
  #set ($title = $displayer.getMessage($menu.title))
  #set ($node = $menu.name)
  #if ($level == 0)
    var $node = new WebFXTree('$title'#if($menu.url),'$!menu.url'#end);
  #else
    var $node = new WebFXLoadTreeItem('$title'#if($menu.forward),'$!menu.forward'#end,'#if($menu.jsFunctionName)$!menu.jsFunctionName#end#if($menu.action)$!menu.action#end', '#if($menu.target)$!menu.target#end', '#if($menu.checkbox)$!menu.checkbox#end' ,"#if($menu.iconarr)$!menu.iconarr#end","#if($menu.leaf)$!menu.leaf#end");
    ${menu.parent.name}.add($node);
  #end
#end

#displayMenu($menu 0)
document.write($menu.name);
